package cn.edu.xmu.datamining.tangzk.mralgos.pagerank;

import org.apache.hadoop.mapreduce.Partitioner;

public class PageRankPartitioner extends
		Partitioner<PageRankNodeKeyWritable, PageRankNodeValueWritable> {

	/**
	 * return only depends on the first part 
	 */
	@Override
	public int getPartition(PageRankNodeKeyWritable key,
			PageRankNodeValueWritable value, int numPartitions) {
		return key.getId() % numPartitions;
	}

}
